//可以在mock.js文件中模拟数据
//如果引入出现... 执行npm i --save-dev @types/mockjs 

// 引入mockjs
import Mock from 'mockjs'

// mock方法--三个参数
  // 1. 拦截请求地址
  // 2. 请求方式
  // 3. 返回数据
    // 形式：1直接返回数据  2函数返回数据


Mock.mock('/mock/share','get',{
    "list":[
        {
            id: "1",
            name: "潘林礼-",
            head: require("../img/users/head/panlinli.jpg"),
            url: require("../img/users/news/panlinli1.jpg"),
            content: "这才是纯欲少女妆的灵魂，太纯了！",
            time: "",
            fabulous: 4888,
            collection: 2653,
            title: "这才是纯欲少女妆的灵魂，太纯了！",
            details: "今天这个纯欲妆我太喜欢了，唇妆部分用的是YSL416黑管唇釉，这支可以封为我心中的白月光了，镜面质感，很经典又耐看，显白不挑皮，越看越喜欢，喜欢收藏口红的宝们不要错过它。薄涂比较轻透，春夏涂超级好看，橘里带一点棕调，上嘴很嫩很有元气，厚涂是很饱满的烂番茄色，像一颗熟透的番茄，平时可以先薄涂，快速抿开，再叠涂一层，涂完像果冻一样的玻璃唇，又纯又欲~",
            detailsImg: [
                require("../img/users/news/panlinli1.jpg"),
                require("../img/users/news/panlinli2.jpg"),
                require("../img/users/news/panlinli3.jpg"),
                require("../img/users/news/panlinli4.jpg"),
            ],
            model: "#YSL416",
            isCollect: false,
            isLike: false,
            comment: [
                {
                    name: "黄梓淇",
                    head: require("../img/users/head/huangziqi.jpg"),
                    content: "这个颜色确实非常好用，我也非常喜欢，值得购买！",
                    time: "2021-07-14"
                },
                {
                    name: "牙套大王",
                    head: require("../img/users/head/yataodawang.jpg"),
                    content: "爱了爱了",
                    time: "2021-04-24"
                },
            ]
        },
        {
            id: "2",
            name: "黄梓淇",
            head: require("../img/users/head/huangziqi.jpg"),
            url: require("../img/users/news/huangziqi1.jpg"),
            content: "美炸了!!!伪素颜口红合集念秋冬必备|TF细白管",
            time: "",
            fabulous: 1438,
            collection: 1243,
            title: "美炸了!!!伪素颜口红合集念秋冬必备|TF细白管",
            details: "这次的雪映流光系列太太太美了!就这一把TOM FORD细白管拿手里瞬间给我拍雪地里了，姐妹们，滑雪、度假、阳光下午荼!就是这种感觉!!!真不是我吹这款就是男票送礼不踩雷系列!就问哪个姐妹拿手里不是会心一笑!!上唇3支!都很日常!TF细白管#108 LA NOTTE白桃乌龙，奶乖奶乖的白桃乌龙奶荼色,暖黄皮很友好，素颜和日常通勤都很可，提气色，不挑妆!TF细白管#03 NUBILE日杂奶茶，超大方的一支奶茶色，这支是我经常空管的一支了，上唇很温柔大方，日杂感真的随便一涂就有暖冬的氛围感!TF细白管#820 LA CHALEUR草莓果冻，鲜亮的草莓果色，非常显嫩的一个颜色!涂上瞬间元气满满!这次的细白管是我很爱的润泽质地，润但不油腻，上色很好不厚重!",
            detailsImg: [
                require("../img/users/news/huangziqi1.jpg"),
                require("../img/users/news/huangziqi2.jpg"),
                require("../img/users/news/huangziqi3.jpg"),
                require("../img/users/news/huangziqi4.jpg"),
                require("../img/users/news/huangziqi5.jpg"),
            ],
            model: "#TOMFORD 雪映流光系列",
            isCollect: false,
            isLike: false,
            comment: [
                {
                    name: "牙套大王",
                    head: require("../img/users/head/yataodawang.jpg"),
                    content: "这个太棒了！！！！好爱啊！",
                    time: "2021-06-30"
                },
            ]
        },
        {
            id: "3",
            name: "牙套大王",
            head: require("../img/users/head/yataodawang.jpg"),
            url: require("../img/users/news/yataodawang1.jpg"),
            content: "dior 迪奥999 永远滴神！",
            time: "",
            fabulous: 3928,
            collection: 2038,
            title: "dior 迪奥999 永远滴神！",
            details: "迪奥999是我第一支用到底的口红，时隔几年又爱了，姐妹们的聚会好嗨皮，不去喝杯酒可惜了哈哈哈!",
            detailsImg: [
                require("../img/users/news/yataodawang1.jpg"),
                require("../img/users/news/yataodawang2.jpg"),
            ],
            model: "#Dior999",
            isCollect: false,
            isLike: false,
            comment: []
        },
    ]
})

Mock.mock('/mock/logo','get',{
    'list':[
        {
            name:'阿玛尼',
            logoUrl:require('../img/logo/amani.png')
        },
        {
            name:'迪奥',
            logoUrl:require('../img/logo/dior.png')
        },
        {
            name:'圣罗兰',
            logoUrl:require('../img/logo/ysl.png')
        },
        {
            name:'兰蔻',
            logoUrl:require('../img/logo/lankou.png')
        },
        {
            name:'GUCCI',
            logoUrl:require('../img/logo/guchi.png')
        }
        ,{
            name:'ESTE LAUDER',
            logoUrl:require('../img/logo/yashilandai.png')
        },
        {
            name:'GIVENCHY',
            logoUrl:require('../img/logo/jifanxi.png')
        },
        {
            name:'CHANEL',
            logoUrl:require('../img/logo/xiangnaier.png')
        }
    ]
})

Mock.mock('/mock/command','get',{
    "list":[
        {
            id: "1",
            name: "迪奥Dior",
            introduce: "传奇红唇 丝绒，红唇微笑，永不出错；经典藤格纹饰带配以全新CD LOGO设计，更添摩登优雅。",
            title: "【Dior】Dior迪奥烈焰蓝金唇膏口红",
            price: "350",
            model: "#999",
            bannerurl: [
                require("../img/product/bannerdior1.jpg"),
                require("../img/product/bannerdior2.jpg"),
                require("../img/product/bannerdior3.jpg"),
                require("../img/product/bannerdior4.jpg"),
            ],
            url: [
                require("../img/product/dior1.jpg"),
                require("../img/product/dior2.jpg"),
                require("../img/product/dior3.jpg"),
                require("../img/product/dior4.jpg"),
            ],
            icons: require("../img/ranking/dior.jpg"),
            isRanking: true,
            isShow: true,
            isCollect: false,
            isLike: false
        },
        {
            id: "2",
            name: "兰蔻",
            introduce: "全新哑光质地，高级丝绒雾面，饱满显色更持久；显白不挑皮，轻松驾驭多场合。",
            title: "【Lancome】兰蔻青春小蛮腰丝绒雾面亚光口红唇膏持久显色",
            price: "300",
            model: "#196",
            bannerurl: [
                require("../img/product/lankou1.jpg"),
                require("../img/product/lankou2.jpg"),
            ],
            icons: require("../img/ranking/lancou.jpg"),
            isRanking: true,
            isShow: true,
            isCollect: false,
            isLike: false
        },
        {
            id: '3',
            name: "阿玛尼",
            introduce: "[显白烂番茄红]“绝美显摆的口红色号”，番茄红的黄金调色比例，显白出圈不挑肤色；显白标杆，百搭不出错，千万女性的挚爱选择",
            title: "【Armani】Armani/阿玛尼红管唇釉丝绒哑光口红大牌烂番茄",
            price: "310",
            model: "#405",
            bannerurl: [
                require("../img/product/banneramani3.jpg"),
                require("../img/product/banneramani4.jpg"),
                require("../img/product/banneramani5.jpg"),
            ],
            url: [require("../img/product/amani6.jpg"),],
            icons: require("../img/ranking/amani.jpg"),
            isRanking: true,
            isShow: true,
            isCollect: false,
            isLike: false
        },
        {
            id: '4',
            name: "YSL圣罗兰",
            introduce: "[New]无法负责的红棕色，YSL416亚光版小今天，新色上市。",
            title: "【YSL】YSL/圣罗兰小金条口红 亚光新色",
            model: "#416",
            price: "350",
            bannerurl: [
                require("../img/product/ysl1.jpg"),
                require("../img/product/ysl2.jpg"),
                require("../img/product/ysl3.jpg"),
            ],
            url: [require("../img/ranking/ysl.jpg"),],
            icons: require("../img/ranking/ysl.jpg"),
            isRanking: true,
            isShow: true,
            isCollect: false,
            isLike: false
        },
        {
            id: '5',
            name: "纪梵希",
            model: "#N37",
            bannerurl: [
                require("../img/ranking/jifanxi.jpg"),
            ],
            url: [require("../img/ranking/jifanxi.jpg"),],
            icons: require("../img/ranking/jifanxi.jpg"),
            isRanking: true,
            isShow: false,
            isCollect: false,
            isLike: false
        },
        {
            id: '6',
            name: "TF",
            model: "#100",
            bannerurl: [
                require("../img/ranking/tf.jpg"),
            ],
            url: [require("../img/ranking/tf.jpg"),],
            icons: require("../img/ranking/tf.jpg"),
            isRanking: true,
            isShow: false,
            isCollect: false,
            isLike: false
        },
        {
            id: '7',
            name: "MAC",
            model: "#997",
            bannerurl: [
                require("../img/ranking/mac.jpg"),
            ],
            url: [require("../img/ranking/mac.jpg"),],
            icons: require("../img/ranking/mac.jpg"),
            isRanking: true,
            isShow: false,
            isCollect: false,
            isLike: false
        },
        {
            id: '8',
            name: "雅诗兰黛",
            model: "#333",
            bannerurl: [
                require("../img/ranking/yashilandai.jpg"),
            ],
            url: [require("../img/ranking/yashilandai.jpg"),],
            icons: require("../img/ranking/yashilandai.jpg"),
            isRanking: true,
            isShow: false,
            isCollect: false,
            isLike: false
        },
        {
            id: '9',
            name: "香奈儿",
            model: "#132",
            bannerurl: [
                require("../img/ranking/xiangnaier.jpg"),
            ],
            url: [require("../img/ranking/xiangnaier.jpg"),],
            icons: require("../img/ranking/xiangnaier.jpg"),
            isRanking: true,
            isShow: false,
            isCollect: false,
            isLike: false
        },
        {
            id: '10',
            name: "欧莱雅",
            model: "#666",
            bannerurl: [
                require("../img/ranking/olaiya.jpg"),
            ],
            url: [require("../img/ranking/olaiya.jpg"),],
            icons: require("../img/ranking/olaiya.jpg"),
            isRanking: true,
            isShow: false,
            isCollect: false,
            isLike: false
        },
        {
            id: "11",
            name: "迪奥Dior",
            introduce: "中国独家发售，909色号，宝贝复古浆果红，丝绒质地，诠释高订质感",
            title: "【Dior】Dior迪奥烈焰蓝金唇膏口红",
            price: "350",
            model: "#909",
            bannerurl: [
                require("../img/product/bannerdior2.jpg"),
                require("../img/product/dior8.jpg"),
                require("../img/product/dior9.jpg"),
            ],
            url: [
                require("../img/product/dior8.jpg"),
                require("../img/product/dior5.jpg"),
                require("../img/product/dior6.jpg"),
                require("../img/product/dior7.jpg"),
            ],
            icons: "",
            isRanking: false,
            isShow: true,
            isCollect: false,
            isLike: false
        },
        {
            id: "12",
            name: "阿玛尼",
            introduce: "自然温柔奶杏色，2：1：4黄金显白调色比例，真正素颜也可驾驭的日常色。7种原色料，精准比例、反复调配，才能调出1种完美颜色。",
            title: "【Armani】Armani/阿玛尼红管口红丝绒哑光唇釉",
            price: "310",
            model: "#214",
            bannerurl: [
                require("../img/product/banneramani1.jpg"),
                require("../img/product/banneramani2.jpg"),
            ],
            url: [
                require("../img/product/amani1.jpg"),
                require("../img/product/amani2.jpg"),
                require("../img/product/amani3.jpg"),
                require("../img/product/amani4.jpg"),
                require("../img/product/amani5.jpg"),
            ],
            icons: "",
            isRanking: false,
            isShow: true,
            isCollect: false,
            isLike: false
        },
  
    ],
})

Mock.mock('/mock/user','get',{
    userInfo:{
        url: require("../img/photo1.jpg"),
        name: "啊呜",
        num: "15875601022",
        sex: "女",
        birthday: "2001-01-28",
        brief: "这个人很懒，什么都没留下"
        
    }
})

Mock.mock('/mock/login','post',(req)=>{
    const reg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
    const {num,code} = JSON.parse(req.body)
    if(reg.test(num) && code == '1234'){
        return {
            result:200,
            data:{
                token: Mock.Random.guid(),
                userInfo:{
                    url: require("../img/photo1.jpg"),
                    name: "啊呜",
                    num,
                    sex: "女",
                    birthday: "2001-01-28",
                    brief: "这个人很懒，什么都没留下"
                }
            }
        }
    }
})